home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d11
/
mus_tips.arc
/
BBSMUS.ARC
/
RBMUS.TXT
< prev
Wrap
Text File
|
1991-01-28
|
8KB
|
192 lines
RBMUS-PO.TXT 11/12/84
HOW TO PUT MUSIC INTO YOUR RBBS
by
P. L. Olympia, Ph.D.
Darwin Systems, Inc.
Sysop, SUGI SIG/M RBBS, 301-963-5249
APOLOGIA
In this piece, I will tell you how to put musical scores into
your RBBS text files such as the WELCOME, BULLETIN and MENUx files.
The actual musical score looks like so much alphabet soup to a caller
using a communication program other than PC-TALK version 4.65 or
later. With the correct version of PC-TALK, though, the caller hears
the music on her PC.
Now, this is the strangest piece I have ever written because the
truth is ... I DON'T KNOW ANYTHING ABOUT MUSIC. I don't know a treble
clef from a cleft chin; for years, I thought that C sharp was a dairy
product from Kraft; I don't know how to play any musical instrument -
although when I was 12 I played the organ - and then only because I
was a boy! Anyway ...
My point here is simply this: I cannot guarantee the veracity of
anything I say about music. I figured out how to put music into RBBS
by deduction and experimentation - like the good old days (a few years
back) when I was at the university professing about atomic structure.
I got on the right track after reading a piece written by Greg Rismoen
(thanks, Greg).
HOW IS IT DONE?
Turns out that the whole thing is the ultimate in simplicity so
long as you are not too shy about plagiarism. I began by fooling
around with the BASICA PLAY statement. I failed miserably here given
my shameful music knowledge (or lack thereof). I then started looking
at some of the song programs in BASIC in the public domain. Then,
everything fell into place ...
Here is a one-line musical score that if you place in any of your
RBBS text file will play that eternal favorite, "Happy Birthday"
^[[MBT120L4MFMNO4C8C8DCFE2C8C8DCGF2C8C8O5CO4A F E D2T90 B-8 B-8 A F G F2
^[[00m
Now, here is the file "HAPPYB.BAS" (author unknown) from where I got
the notes:
5 FOR X%=1 TO 15:Y$=INKEY$:NEXT X%
6 IF INKEY$="" THEN 6
10 PLAY "t120 l4 mfmn"
20 PLAY "o4 c8 c8 d c f e2"
30 PLAY " c8 c8 d c g f2"
40 PLAY " c8 c8 o5 c o4 a f e d2"
50 PLAY "t90 b-8 b-8 a f g f2"
58 FOR X%=1 TO 15:Y$=INKEY$:NEXT X%
59 IF INKEY$="" THEN 59
60 CHAIN "A:PLOTTER
Do you see the connection? All I did was begin the musical score
with the ANSI sequence <ESC>[MF (that is the ^[[MF), then appended
all those arguments of the PLAY statement to it, then terminated the
line with a <CTRL-N>. The ^[[00m in the following line is not really
part of the song but simply turns off any special screen attributes
so that the caller's PC-TALK defaults are restored.
ONE MORE TIME
Since I may have gone a little too fast there, let's review the
rules:
o Each musical score line must begin with <ESC>[ (shows on your
screen as ^[[) and terminate with a CTRL-N
o The very first line should have MB (Music Background, that is,
don't wait until the score is finished before continuing with
another process) following the <ESC>[ sequence. I found that MF
(Music Foreground) also works.
o The MB (or MF) is NOT necessary on succeeding lines.
o Between the <ESC>[ and the CTRL-N you can place the notes (A-G),
musical directives such as T (Tempo, e.g., T120), L (Length of
note e.g., L6), O (Octave, e.g., O3). All this mumbo-jumbo codes
are explained below. Be patient.
o Everything must be in CAPS. The BASICA PLAY statement is case-
insensitive but PC-TALK which is the one that will interpret the
musical code insists on CAPS only.
o Spaces between the notes or music directives are OPTIONAL.
o It is best to place all the notes or directives into one line. If
the song is too long try to use as few lines as possible. That is
because the song becomes artificially broken when PC-TALK sees a
CR/LF sequence and echoes those to the user's terminal.
o It is a good idea to terminate the song with <ESC>[00m That
turns off all special attributes to prevent PC-TALK from being
confused.
WHAT DOES ALL THAT GOBBLEDYGOOK MEAN?
All you music lovers who are not programmers are probably
wondering what all those musical codes such as G#, T120, O3, B-8 mean?
Here is the scoop:
CHARACTERS IN MUSICAL SCORE (AND BASICA PLAY STATEMENT)
A - G Musical Notes
# or + Following A-G note means sharp
- Following A-G note means flat
< Move down one octave
> Move up one octave
. Period acts as dotted note (extend note duration by 3/2)
FOREGROUND OR BACKGROUND
MF Music Foreground (complete note before starting another process;
MB Music Background (another process may begin before speaker is
finished playing note)
DURATION, TEMPO AND OTHERS
MN Music note duration Normal (7/8 of interval between notes)
MS Music note duration Staccato (decrease duration of following notes)
ML Music note duration Legato (increase duration of following notes)
Ln Length of note (n=1-64, 1=whole note, 4=quarter note, etc)
Pn Pause length (same n values as Ln above)
Tn Tempo, n=notes/minute (n=32-255, default n=120)
On Octave number (n=0-6, default n=4)
Nn Play note number n (n=0-84, used in BASICA PLAY statement)
Xstring Execute string (used only in BASICA PLAY statement)
As I undse giv o the f the f Gre0mng I c/Krthat w
anith de2dethe u
a e a e a e a p waltacincr
*NE: fotion here here hGre0mng ng nCO4CO4CUG r iP çwr1 is